package com.mm.service;


import com.mm.dao.UserFeignClient;
import com.mm.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import java.util.ArrayList;
import java.util.List;

/**
 * @author XiaoLuo
 * @ClassName: UserService
 * @Description: ${todo}
 * @date 2019/4/6 21:03
 */
@Service public class UserService {
	/*
		@Autowired
		private UserDao userDao;*/
	@Autowired private UserFeignClient userFeignClient;

	public List<User> queryUserByIds(List<Long> ids) {
		List<User> users = new ArrayList<>();
		ids.forEach(id -> {
			users.add(this.userFeignClient.queryUserById(id));
		});
		return users;
	}
}
